using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CollegeShop.Infrastructure.Entities.Repository;

namespace CollegeShop.Infrastructure.Entities.Entity
{
    public class Putin : IAccessible<T_Putin, Putin>, ILogicEntity<T_Putin, Putin>
    {
        public int ID { get; set; }

        public string PutInNumber { get; set; }

        public int PurchaseID { get; set; }

        public int PutInSumAmount { get; set; }

        public decimal PutInSumMoney { get; set; }

        public int State { get; set; }

        public string Remark { get; set; }

        public string CreateUser { get; set; }

        public DateTime CreateTime { get; set; }

        protected override void Covariant(T_Putin model)
        {
            if (model != null)
            {
                    this.ID = model.ID;
                    this.PutInNumber = model.PutInNumber;
                    this.PurchaseID = model.PurchaseID;
                    this.PutInSumAmount = model.PutInSumAmount;
                    this.PutInSumMoney = model.PutInSumMoney;
                    this.State = model.State;
                    this.Remark = model.Remark;
                    this.CreateUser = model.CreateUser;
                    this.CreateTime = model.CreateTime;
            }
}
        protected override T_Putin Inverter(Putin model)
        {
            if (model != null)
            {
                return new T_Putin()
                {
                    ID = model.ID,
                    PutInNumber = model.PutInNumber,
                    PurchaseID = model.PurchaseID,
                    PutInSumAmount = model.PutInSumAmount,
                    PutInSumMoney = model.PutInSumMoney,
                    State = model.State,
                    Remark = model.Remark,
                    CreateUser = model.CreateUser,
                    CreateTime = model.CreateTime,
                };
            }
            return null;
        }
        public Putin Set(T_Putin dbModel)
        {
            Covariant(dbModel);
            return this;
        }
    }
}
